import http from '@/service/request/index.js'


// 添加订单(需要token)
export function addOrderApi(data){
	return http.post('/api/shop/order',data)
}
// 获取订单列表(需要token)
export function getOrderListApi(params){
	return http.get('/api/shop/order',{params})
}
// 删除订单
export function delOrderListApi(id){
	return http.delete(`/api/shop/order/${id}`)
}
// 支付订单
export function payOrderListApi(data){
	return http.post(`/api/shop/orderpay`,data)
}
// 获取订单单条信息(需要token)
export function getOrderApi(id){
	return http.get(`/api/shop/order/${id}`)
}
// 更新订单信息
export function updOrderListApi(id,data){
	return http.put(`/api/shop/order/${id}`,data)
}